// =================================================================================================
//
//	CopyEngine Framework
//	Copyright 2012 Eran. All Rights Reserved.
//
//	This program is free software. You can redistribute and/or modify it
//	in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================

/**
 * Created by eran on 15-1-9.
 */
package gui.utils.blockEditor.ext
{
    import data.BlockVo;

    import flash.display.MovieClip;

    public class ExtEditPanelBasic
    {
        private var mIsDuringShowPanel:Boolean;
        protected var mPanelMc:MovieClip;
        protected var mTargetVo:BlockVo;

        public function ExtEditPanelBasic()
        {
        }

        //=================================//
        //=== Initialize & Dispose ========//
        //=================================//

        public final function initialize(_panelMc:MovieClip):void
        {
            mPanelMc = _panelMc;
            doInitialize();
        }

        protected function doInitialize():void {}

        //=================================//
        //====== Public Function ==========//
        //=================================//

        public final function saveDataBackToVo(_vo:BlockVo):void
        {
            mTargetVo = _vo;
            if (mIsDuringShowPanel)
            {
                doSaveDataBackToVo();
            }
        }

        public final function show():void
        {
            mPanelMc.visible = true;
            mIsDuringShowPanel = true;
        }

        public final function hide():void
        {
            mPanelMc.visible = false;
            mIsDuringShowPanel = false;
        }

        public function isShowPanel(_blockTypeStr:String):Boolean {return false}

        //=================================//
        //====== Override Function ========//
        //=================================//

        protected function doSaveDataBackToVo():void
        {
        }


    }
}
